package cn.edu.scau.cmi.xiefuan.abstractfactory.factory;

import cn.edu.scau.cmi.xiefuan.abstractfactory.domainAbstractClass.AbstractBodyInjury;
import cn.edu.scau.cmi.xiefuan.abstractfactory.domainAbstractClass.AbstractCasualty;
import cn.edu.scau.cmi.xiefuan.abstractfactory.domainAbstractClass.AbstractDamageCar;
import cn.edu.scau.cmi.xiefuan.abstractfactory.domainAbstractClass.AbstractMutiAccidents;

public abstract class InsuranceFactory {

	public static InsuranceFactory getInsuranceFactory(String companyName) {
		if (companyName == "PICC") {
			return new PICCFactory();
		} else if (companyName == "PingAn") {
			return new PingAnFactory();
		}
		return null;

	}

	public abstract AbstractBodyInjury createBodyInjury();

	public abstract AbstractCasualty createCasualty();

	public abstract AbstractDamageCar createDamageCar();

	public abstract AbstractMutiAccidents createMutiAccidents();

}
